import { CMDatabase } from '../dbsync/CMDatabase'
import { IStudent } from '../model/IStudent';
export class StudentServices {
    cmdDataBase: CMDatabase
    constructor() {
        this.cmdDataBase = new CMDatabase()
    }
    test() {
        let r = new Array<string>()
        r.push("Jason")
        r.push("Lucy")
        return r
    }
    save(student: IStudent) {
        this.cmdDataBase.students.put(student)
    }
    query(param: IStudent) {
        this.cmdDataBase.students
    }
    async queryAll() {
        const r=await this.cmdDataBase.students.toArray()
        return r;
    }
}